package com.ruiben.mall.utils;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * Created by admin on 2018/8/29.
 */
public class PropConfig {

    //创建资源对象
    private static Properties prop = new Properties();

    //加载资源路径
    static {
        try {
            prop.load(PropConfig.class.getResourceAsStream("/wechat.properties"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String get(String key) {
        return prop.getProperty(key);
    }

    public static void setProps(Properties p){
        prop = p;
    }

}
